/***
{
            "stock":44,
            "sales":6,
            "id":121,
            "name":"男式 运动休闲牛仔短裤42M2ST56",
            "point":500,
            "buymoney":"0.10",
            "money":"100.00",
            "image":"https://888.ph100.cn/uploads/image/20180531_093421_000[1].jpg",
            "displayorder":2,
            "wait_money":"0.00",
            "slogan":"休闲运动",
            "length":19
        }
***/
<template>
  <div>
    <div class="shopcell">
      <div class="container"  @click="onlclick">
        <image style="width:300px;height:300px;" :src="lbean.image"></image>
        <div>
          <text>{{lbean.name}}</text>
          <text>{{lbean.money}}</text>
          <text>{{lbean.buymoney}}+{{lbean.point}}</text>
        </div>
      </div>
      <div class="container" @click="onrclick"  v-if="rbean.image">
        <image style="width:370px;height:300px;" :src="rbean.image"></image>
        <div>
          <text>{{rbean.name}}</text>
          <text>{{rbean.money}}</text>
          <text>{{rbean.buymoney}}+{{rbean.point}}</text>
        </div>
      </div>
    </div>
  </div>

</template>

<style scoped>
  .container {
    width: 360px;
    background-color: #ffffff;
    margin: 8px;
  }
  .shopcell{
    flex-direction: row;
    justify-content: flex-start;
    height: 500px;
  }

</style>

<script>
  export default {
    props: {
      lbean:Object,
      rbean:Object
    },
    methods: {
      onlclick(e){
        console.log('onclick:', e);
        //this.$event.emit('ongoodclick',{shopid:1951});
        this.$router.open({
            name: 'shop.detail',
            type: 'PUSH',
            params: {
              goodsid:this.lbean.id
            }
        });
      },
      onrclick(e){
        console.log('onclick:', e);
        //this.$event.emit('ongoodclick',{shopid:1951});
        this.$router.open({
            name: 'shop.detail',
            type: 'PUSH',
            params: {
              goodsid:this.rbean.id
            }
        });
      },
    }
  }
</script>
